package com.mifengkong.cygshare.model;

import com.mifengkong.cygshare.bean.KaMaoVipBean;
import com.mifengkong.cygshare.constant.ServletAddressConstant;
import com.mifengkong.frtools.http.request.HttpFunction;

import java.util.List;

import io.reactivex.Observable;
import io.reactivex.Observer;

/**
 * Created by jack on 2018/1/16
 */

public class GetVipListModel extends BaseModel {

    public static GetVipListModel getInstance() {
        return getPresent(GetVipListModel.class);
    }

    public void execute(Observer<List<KaMaoVipBean>> observer) {
        Observable<List<KaMaoVipBean>> observable = mServletApi.getVipList(mParams).map(new HttpFunction<List<KaMaoVipBean>>());
        toSubscribe(observable, observer);
    }

    @Override
    protected String getDoMainType() {
        return ServletAddressConstant.KA_MAO;
    }
}
